//
//  WeChatResponse.swift
//  Kosspot
//
//  Created by 李鑫 on 2025/8/25.
//

import Foundation

struct WeChatResponse: BaseResponseProtocol {
    let code: Int
    let msg: String
    let data: LoginData
    
    struct LoginData: Codable {
        let user: User
        let token: String
        let needBindMobile: Bool
        enum CodingKeys: String, CodingKey {
            case user, token
            case needBindMobile = "needBindMobile"
        }
    }
    struct User: Codable, Identifiable {
        let id: Int
        let mobile: String
        let password: String?
        let nickname: String
        let gender: Int
        let birthday: String?
        let avatar: String?
        let status: Int?
        let registerTime: String
        let lastLoginTime: String?
        let isCertified: Bool?
        let deleted: Int
        let height: Double?
        let weight: Double?
        enum CodingKeys: String, CodingKey {
            case id, mobile, password, nickname, gender, birthday, avatar, status
            case registerTime = "registerTime"
            case lastLoginTime = "lastLoginTime"
            case isCertified, deleted, height, weight
        }
    }
}
